package com.wuliu.system.service.impl;

import java.util.List;
import com.wuliu.common.utils.DateUtils;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import com.wuliu.system.mapper.TspDrivingDeptMapper;
import com.wuliu.system.domain.TspDrivingDept;
import com.wuliu.system.service.ITspDrivingDeptService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

/**
 * 行车记录途经站点Service业务层处理
 * 
 * @author realue
 * @date 2023-11-04
 */
@Service
public class TspDrivingDeptServiceImpl extends ServiceImpl<TspDrivingDeptMapper, TspDrivingDept> implements ITspDrivingDeptService {
    @Resource
    private TspDrivingDeptMapper tspDrivingDeptMapper;

    /**
     * 查询行车记录途经站点
     * 
     * @param id 行车记录途经站点主键
     * @return 行车记录途经站点
     */
    @Override
    public TspDrivingDept selectTspDrivingDeptById(String id) {
        return tspDrivingDeptMapper.selectTspDrivingDeptById(id);
    }

    /**
     * 查询行车记录途经站点列表
     * 
     * @param tspDrivingDept 行车记录途经站点
     * @return 行车记录途经站点
     */
    @Override
    public List<TspDrivingDept> selectTspDrivingDeptList(TspDrivingDept tspDrivingDept) {
        return tspDrivingDeptMapper.selectTspDrivingDeptList(tspDrivingDept);
    }

    /**
     * 新增行车记录途经站点
     * 
     * @param tspDrivingDept 行车记录途经站点
     * @return 结果
     */
    @Override
    public int insertTspDrivingDept(TspDrivingDept tspDrivingDept) {
        tspDrivingDept.setCreateTime(DateUtils.getNowDate());
        return tspDrivingDeptMapper.insertTspDrivingDept(tspDrivingDept);
    }

    /**
     * 修改行车记录途经站点
     * 
     * @param tspDrivingDept 行车记录途经站点
     * @return 结果
     */
    @Override
    public int updateTspDrivingDept(TspDrivingDept tspDrivingDept) {
        tspDrivingDept.setUpdateTime(DateUtils.getNowDate());
        return tspDrivingDeptMapper.updateTspDrivingDept(tspDrivingDept);
    }

    /**
     * 批量删除行车记录途经站点
     * 
     * @param ids 需要删除的行车记录途经站点主键
     * @return 结果
     */
    @Override
    public int deleteTspDrivingDeptByIds(String[] ids) {
        return tspDrivingDeptMapper.deleteTspDrivingDeptByIds(ids);
    }

    /**
     * 删除行车记录途经站点信息
     * 
     * @param id 行车记录途经站点主键
     * @return 结果
     */
    @Override
    public int deleteTspDrivingDeptById(String id) {
        return tspDrivingDeptMapper.deleteTspDrivingDeptById(id);
    }
}
